package cn.icatw.gulimall.product.fallback;

import cn.icatw.common.exception.BizCodeEnum;
import cn.icatw.common.utils.R;
import cn.icatw.gulimall.product.feign.SeckillFeignService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;


/**
 * 秒杀远程调用方法回调
 *
 * @author icatw
 * @date 2022/04/11
 */
@Slf4j
@Component
public class SeckillFeignServiceFallBack implements SeckillFeignService {

    @Override
    public R getSkuSeckillInfo(Long skuId) {
        log.info("熔断方法调用.....getSkuSeckillInfo");
        return R.error(BizCodeEnum.TO_MANY_REQUEST.getCode(), BizCodeEnum.TO_MANY_REQUEST.getMsg());
    }
}
